package com.diandian.backend.order.param;

import com.diandian.base.boot.starter.exception.DefaultException;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.diandian.backend.order.dto.OrderOnlineDouyinLifeDetailDetailParamDTO;

import java.io.Serializable;
import java.util.Date;

public class OrderOnlineDouyinLifeDetailDetailParam implements Serializable {

	private Long id;
	private String belong;
	private String onlineOrderNum;
	private String onlineOrderCouponId;
	private String onlineOrderCouponName;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;
	private Integer del;

	public void check(){
		if(this.belong == null || "".equals(this.belong)){
			throw new DefaultException("归属标识不能为空");
		}
	}

	public OrderOnlineDouyinLifeDetailDetailParamDTO toDTO(){
		OrderOnlineDouyinLifeDetailDetailParamDTO dto = new OrderOnlineDouyinLifeDetailDetailParamDTO();
		dto.setId(this.id);
		dto.setBelong(this.belong);
		dto.setOnlineOrderNum(this.onlineOrderNum);
		dto.setOnlineOrderCouponId(this.onlineOrderCouponId);
		dto.setOnlineOrderCouponName(this.onlineOrderCouponName);
		dto.setCreateTime(this.createTime);
		dto.setDel(this.del);
		return dto;
	}

	public Long getId() {
		return id;
	}
	public Long setId(Long id) {
		return this.id = id;
	}
	public String getBelong() {
		return belong;
	}
	public String setBelong(String belong) {
		return this.belong = belong;
	}
	public String getOnlineOrderNum() {
		return onlineOrderNum;
	}
	public String setOnlineOrderNum(String onlineOrderNum) {
		return this.onlineOrderNum = onlineOrderNum;
	}
	public String getOnlineOrderCouponId() {
		return onlineOrderCouponId;
	}
	public String setOnlineOrderCouponId(String onlineOrderCouponId) {
		return this.onlineOrderCouponId = onlineOrderCouponId;
	}
	public String getOnlineOrderCouponName() {
		return onlineOrderCouponName;
	}
	public String setOnlineOrderCouponName(String onlineOrderCouponName) {
		return this.onlineOrderCouponName = onlineOrderCouponName;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public Date setCreateTime(Date createTime) {
		return this.createTime = createTime;
	}
	public Integer getDel() {
		return del;
	}
	public Integer setDel(Integer del) {
		return this.del = del;
	}
}
